package asia.kalin.config;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: Kalin
 * @Name：SnowflakeConfig
 * @Date: 2025/3/10
 * @description
 */

@Configuration
public class SnowflakeConfig {

    @Bean
    public Snowflake snowflake() {
        // 这里设置数据中心ID和机器ID，需要根据实际情况配置
        return IdUtil.getSnowflake(1, 1);
    }
}
